package kr.co.dayve.site.management.dao;

import kr.co.dayve.site.domain.Board;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import java.util.List;

/**
 * 테스트용 게시판 Dao 구현
 */
public class BoardDaoImpl extends SqlMapClientDaoSupport implements BoardDao {
	public List getBoardListBySearchword(Board board) {
        return getSqlMapClientTemplate().queryForList("BOARD.getBoardListBySearchword", board, board.getCurrentPage() * board.getPageSize(), board.getPageSize());
    }

    public String getTotalCountBySearchword(Board board) {
        return (String)getSqlMapClientTemplate().queryForObject("BOARD.getTotalCountBySearchword", board);
    }
}
